local Lua__xiongwei = fk.CreateSkill {

  name = "Lua__xiongwei",

  tags = { Skill.Limited },

}

Fk:loadTranslationTable{
    
    ["Lua__xiongwei"] = "雄伟",
    [":Lua__xiongwei"] = "限定技，你进入濒死状态时，你可以获得三点体力上限，并将体力值回复至上限，然后“鹿管”不再有次数限制，最后你获得技能“崩坏”。",
    ["@@xiongwei"] = "雄伟",


}

Lua__xiongwei:addEffect(fk.EnterDying, {
    anim_type = "special",
    can_trigger = function(self, event, target, player, data)
        return target == player and player:hasSkill(Lua__xiongwei.name) and 
               player:getMark("@@xiongwei") == 0
    end,
    on_cost = function(self, event, target, player, data)
        return player.room:askToSkillInvoke(player, {skill_name = Lua__xiongwei.name,})
    end,
    on_use = function(self, event, target, player, data)
        local room = player.room
        -- 增加体力上限
        room:changeMaxHp(player, 3)
        -- 恢复体力
        room:recover({
            who = player,
            num = player.maxHp - player.hp,
            recoverBy = player,
            skillName = Lua__xiongwei.name,
        })
        -- 设置标记
        room:addPlayerMark(player, "@@xiongwei", 1)
        -- 获得崩坏技能
        room:handleAddLoseSkills(player, "LGbenghuai", nil)
    end,
})

return Lua__xiongwei